<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
	<title>Dynatree - Example</title>

	<script src="../jquery/jquery.js" type="text/javascript"></script>
	<script src="../jquery/jquery-ui.custom.js" type="text/javascript"></script>
	<script src="../jquery/jquery.cookie.js" type="text/javascript"></script>

	<link href="../src/skin/ui.dynatree.css" rel="stylesheet" type="text/css">
	<script src="../src/jquery.dynatree.js" type="text/javascript"></script>

	<!-- Start_Exclude: This block is not part of the sample code -->
	<link href="prettify.css" rel="stylesheet">
	<script src="prettify.js" type="text/javascript"></script>
	<link href="sample.css" rel="stylesheet" type="text/css">
	<script src="sample.js" type="text/javascript"></script>
	<!-- End_Exclude -->

<script type="text/javascript">
	$(function(){
		$("#tree").dynatree({
			onActivate: function(node) {
				$("#echoActive").text(node.data.title);
			},
			onDeactivate: function(node) {
				$("#echoActive").text("-");
			}
		});
	});
</script>
</head>

<body class="example">
	<h1>Example: Init from &lt;ul> element</h1>
	<p class="description">
		This sample initializes the tree from a &lt;ul> element.
	</p>

	<div id="tree">
		<ul style="display:none">
			<li id="key1" title="Look, a tool tip!">item1 with key and tooltip
			<li id="key2" class="selected">item2: selected on init
			<li id="key3" class="folder">Folder with some children
				<ul>
					<li id="key3.1">Sub-item 3.1
					<li id="key3.2">Sub-item 3.2
				</ul>

			<li id="key4" class="expanded">Document with some children (expanded on init)
				<ul>
					<li id="key4.1">Sub-item 4.1
					<li id="key4.2">Sub-item 4.2
				</ul>
		</ul>
	</div>
	<div>Active node: <span id="echoActive">-</span></div>

	<!-- Start_Exclude: This block is not part of the sample code -->
	<hr>
	<p class="sample-links  no_code">
		<a class="hideInsideFS" href="http://dynatree.googlecode.com">jquery.dynatree.js project home</a>
		<a class="hideOutsideFS" href="#">Link to this page</a>
		<a class="hideInsideFS" href="samples.html">Example Browser</a>
		<a href="#" id="codeExample">View source code</a>
	</p>
	<pre id="sourceCode" class="prettyprint" style="display:none"></pre>
	<!-- End_Exclude -->
</body>
</html>
